// 定义money的存储单元
import { defineStore } from 'pinia'
export const useMoneyStore = defineStore('money', {
    state: () => ({ money: 100 }),
    getters: {
        rmb: (state) => state.money,
        usd: (state) => state.money * 0.14,
        eur: (state) => state.money * 0.13
    },
    actions: {
        win(arg) {
            this.money += arg;
        },
        pay(arg) {
            this.money -= arg;
        }
    },
})